package Structural.Composite.demo1;

import java.util.ArrayList;
import java.util.List;

public class BranchNode extends Node {

	public String content;
	public List<Node> nodes = new ArrayList<>();

	public BranchNode(String content) {
		this.content = content;
	}

	public void add(Node node) {
		this.nodes.add(node);
	}

	@Override
	public void printName() {
		System.out.println(this.content);
	}
}
